<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon">
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>登录 - 梦幻蛋糕坊</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>
<div class="login-register-container">
    <div class="login-register-header">
        <h2>登录</h2>
    </div>
    <div class="login-register-form">
        <c:if test="${not empty msg}">
            <p style="color:red">${msg}</p>
        </c:if>
        <form action="${pageContext.request.contextPath}/user" method="post">
            <input type="hidden" name="action" value="login"/>
            <div class="form-group">
                <label for="username">用户名：</label><br/>
                <input type="text" id="username" name="username" required>
            </div>
            <div class="form-group">
                <label for="password">密码：</label><br/>
                <input type="password" id="password" name="password" required>
            </div>
            <div style="margin-top:10px;">
                <button type="submit" class="btn">登录</button>
                <a href="register.jsp" class="login-register-link" style="margin-left:10px;">没有账号？注册</a>
            </div>
        </form>
    </div>
</div>
</body>
</html>
